/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.itver.uml.dataobject;

import java.awt.Image;
import java.beans.BeanInfo;
import org.openide.loaders.DataNode;
import org.openide.nodes.Children;

/**
 *
 * @author Viruz
 */
public class NodeItverData extends DataNode {

    private ItverData data;

    public NodeItverData(ItverUMLDataObject obj, ItverData data) {
        super( obj, Children.LEAF );
        this.data = data;

        setName( data.getId() );
        setShortDescription( data.getComentario() );
    }

    @Override
    public Image getIcon(int i) {
        if( i == BeanInfo.ICON_COLOR_16x16 || i == BeanInfo.ICON_MONO_16x16 ) {
            return data.getSmallImage();
        }
            return data.getBigImage();
    }

    @Override
    public String getDisplayName() {
        return data.getDisplayName();
    }
}

